<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <g:set var="entityName" value="${message(code: 'account.label', default: 'Account')}" />
    <title>机构准入待办详情(已申请页)</title>
    <asset:stylesheet src="intelligence/swiper.css"/>
    <style>
    .contact-stat{
        padding: 8px 0px;
        text-align: center;
    }
    .contact-stat span{
        font-size: 13px;
        color: #88898c;
        margin-bottom: 10px;
    }
    .contact-stat strong{
        font-size: 13px;
        word-wrap: break-word;
    }
    .nav-tabs{
        border-bottom: none;
    }
    .hpanel > .panel-footer, .hpanel > .panel-section{
        background: #f9f9f9;
    }
    .flex{
        display: flex;justify-content: center;align-items: center;
    }
    .newFontSize{
        font-size: 12px;
    }
    table>tbody>tr>td, table>tbody>tr>th,.table>tfoot>tr>td, table>tfoot>tr>th, table>thead>tr>td, table>thead>tr>th{
        padding: 8px;
        line-height: 1.42857143;
        white-space: nowrap;
    }
    /*轮播图样式*/
    .swiper-container{
        width: 100%;
        height: 300px;
        margin-top: 10px;
    }
    .swiper-pagination-bullet-active{
        opacity: 0.6;
        background: #fff;
    }
    @media (max-width:1654px){
        #screenPage,#screenPage_1{
            height:162px;
        }
    }
    @media (max-width:1382px){
        #screenPage_2{
            height:477px;
        }
    }
    </style>
</head>
<body class="fixed-navbar fixed-sidebar">

<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right navFloatRight">
                <ol class="hbreadcrumb breadcrumb">
                    <li>
                        <span>CINDTATA PLS</span>
                    </li>
                    <li>
                        <span><g:link controller="workflowInstanceUser" action="accountPending">机构审批待办</g:link></span>
                    </li>
                    <li class="active">
                        <span>机构审批待办详情</span>
                    </li>
                </ol>
            </div>
        </div>
    </div>
</div>

<g:if test="${params?.message}">
    <div class="message alert alert-info" role="status">${params?.message}</div>
</g:if>

<g:if test="${flash.message}">
    <div class="message alert alert-info" role="status">${flash.message}</div>
</g:if>

<div class="content animate-panel">

    <div class="row">
        <div class="hpanel hred" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                机构信息
            </div>

            <div class="panel-body">
                <h4>
                    ${account?.name?account?.name:'-'}
                    %{--<span class="label label-success pull-right">${this?.workflowInstance?.stage?.name}</span>--}%
                </h4>

            </div>

            <div class="panel-footer contact-footer">
                <div class="row">

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>机构类型</span>
                            <strong>${account?.type?account?.type?.name:'-'}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>城市行政区</span>
                            <strong>${account?.city?.name?account?.city?.name:'-'} ${account?.district?.name?account?.district?.name:'-'}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>机构联系人</span>
                            <strong>${account?.contact?account?.contact:'-'}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>机构联系方式</span>
                            <strong>${account?.phone?account?.phone:'-'}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>机构状态</span>
                            <strong>${account?.status?'启用':'禁用'}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>工作流</span>
                            <strong>${workflowInstance?.workflow?.name}</strong>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--机构详情--}%
    <div class="row">
        <div class="hpanel hgreen " style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <sec:ifAllGranted roles="ROLE_CUSTOMER_MANAGER">
                        <g:if test="${approveRoleFlag}">
                            <g:link action="externalAccountEditDetail" id="${this?.account?.id}" params="${params}" class="btn btn-info btn-xs"><i class="fa fa-edit"></i>完善机构</g:link>
                        </g:if>
                    </sec:ifAllGranted>
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                机构详情
            </div>
            <div class="panel-body no-padding" style="overflow-x:auto;">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>企业名称</th>
                        <th>法人</th>
                        <th>法人性别</th>
                        <th>法人电话</th>
                        <th>法人电子邮箱</th>
                        <th>法人从事房地产经纪年限</th>
                        <th>法人学历</th>
                        <th>所在省</th>
                        <th>所在市</th>
                        <th>所在区</th>
                        <th>成立日期</th>
                        <th>单位性质</th>
                        <th>企业规模</th>
                        <th>公司层级</th>
                        <th>电话号码</th>
                        <th>邮编</th>
                        <th>传真</th>
                        <th>电子邮箱</th>
                        <th>网址</th>
                        <th>经营期限</th>
                        <th>经营范围</th>
                        <th>经营状态</th>
                        <th>经营状况</th>
                        <th>公司简介</th>
                        <th>信用评级</th>
                        <th>资质等级</th>
                        <th>资质等级评定日期</th>
                        <th>注册资金</th>
                        <th>注册资金币种</th>
                        <th>是否集团公司</th>
                        <th>是否集团总部</th>
                        <th>是否上市公司</th>
                        <th>证书编号</th>
                        <th>组织机构代码</th>
                        <th>营业执照</th>
                        <th>营业期限起始日期</th>
                        <th>营业期限到期日期</th>
                        <th>注销日期</th>
                        <th>吊销日期</th>
                        <th>企业地址</th>
                        <th>通讯地址</th>
                        <th>登记机关</th>
                        <th>工商登记日</th>
                        <th>备案证书号</th>
                        <th>备案日期</th>
                        <th>发照日期</th>
                        <th>统一社会信用代码</th>
                        <th>实收资本金</th>
                        <th>实收资本金币种</th>
                        <th>负面信息</th>
                        <th>认缴出资额</th>
                        <th>出资时间</th>
                        <th>许可证号</th>
                        <th>审核时间</th>
                        <th>融资信息</th>
                        <th>税务信息</th>
                        <th>清算信息</th>
                        <th>工商登记注册类型</th>
                        <th>企业总经理</th>
                        <th>最近年检情况</th>
                        <th>代理机构编号</th>
                        <th>注册地址行政区划代码</th>
                        <th>资质名称</th>
                        <th>有效期限</th>
                        <th>股东人数</th>
                        <th>资质发证日期</th>
                        <th>资质有效期限终止</th>
                        <th>企业简称</th>
                        <th>注册地址</th>
                        <th>机构类型</th>
                        <th>公积金缴存情况</th>
                        <th>企业状态</th>
                        <th>注册号</th>
                        <th>核准日期</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>${account?.name?account?.name:'-'}</td>
                        <td>${account?.fullName?account?.fullName:'-'}</td>
                        <td>${account?.sex?account?.sex:'-'}</td>
                        <td>${account?.cellphone?account?.cellphone:'-'}</td>
                        <td>${account?.legalPersonEmail?account?.legalPersonEmail:'-'}</td>
                        <td>${account?.workingYears?account?.workingYears:'-'}</td>
                        <td>${account?.degree?account?.degree:'-'}</td>
                        <td>${account?.province?account?.province?.name:'-'}</td>
                        <td>${account?.city?account?.city?.name:'-'}</td>
                        <td>${account?.district?account?.district?.name:'-'}</td>
                        <td>
                            <g:if test="${account?.establishDate}">
                                <g:formatDate date="${account?.establishDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${account?.unitNature?account?.unitNature?.name:'-'}</td>
                        <td>${account?.scale?account?.scale:'-'}</td>
                        <td>${account?.hierarchy?account?.hierarchy:'-'}</td>
                        <td>${account?.phone?account?.phone:'-'}</td>
                        <td>${account?.zipCode?account?.zipCode:'-'}</td>
                        <td>${account?.fax?account?.fax:'-'}</td>
                        <td>${account?.email?account?.email:'-'}</td>
                        <td>${account?.website?account?.website:'-'}</td>
                        <td>${account?.operatingPeriod?account?.operatingPeriod:'-'}</td>
                        <td>${account?.scopeOfBusiness?account?.scopeOfBusiness:'-'}</td>
                        <td>${account?.operatingState?account?.operatingState:'-'}</td>
                        <td>${account?.operatingConditions?account?.operatingConditions:'-'}</td>
                        <td>${account?.description?account?.description:'-'}</td>
                        <td>${account?.creditRating?account?.creditRating:'-'}</td>
                        <td>${account?.qualificationGrade?account?.qualificationGrade:'-'}</td>
                        <td>
                            <g:if test="${account?.dateOfQualificationRating}">
                                <g:formatDate date="${account?.dateOfQualificationRating}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${account?.registeredCapital?account?.registeredCapital:'-'}</td>
                        <td>${account?.currency?account?.currency?.name:'-'}</td>
                        <td>${account?.isGroupCompany?account?.isGroupCompany:'-'}</td>
                        <td>${account?.isGroupHeadquarters?account?.isGroupHeadquarters:'-'}</td>
                        <td>${account?.isListedCompany?account?.isListedCompany:'-'}</td>
                        <td>${account?.certificateNumber?account?.certificateNumber:'-'}</td>
                        <td>${account?.organizationCode?account?.organizationCode:'-'}</td>
                        <td>${account?.businessLicense?account?.businessLicense:'-'}</td>
                        <td>
                            <g:if test="${account?.startDate}">
                                <g:formatDate date="${account?.startDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>
                            <g:if test="${account?.endDate}">
                                <g:formatDate date="${account?.endDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>
                            <g:if test="${account?.logoutDate}">
                                <g:formatDate date="${account?.logoutDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>
                            <g:if test="${account?.revocationDate}">
                                <g:formatDate date="${account?.revocationDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${account?.address?account?.address:'-'}</td>
                        <td>${account?.postalAddress?account?.postalAddress:'-'}</td>
                        <td>${account?.registerOrg?account?.registerOrg:'-'}</td>
                        <td>
                            <g:if test="${account?.registerDate}">
                                <g:formatDate date="${account?.registerDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${account?.recordCertificateNumber?account?.recordCertificateNumber:'-'}</td>
                        <td>
                            <g:if test="${account?.recordDate}">
                                <g:formatDate date="${account?.recordDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>
                            <g:if test="${account?.licenseIssuingDate}">
                                <g:formatDate date="${account?.licenseIssuingDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${account?.unifiedSocialCreditCode?account?.unifiedSocialCreditCode:'-'}</td>
                        <td>${account?.actuallyRaisingFund?account?.actuallyRaisingFund:'-'}</td>
                        <td>${account?.raisingFundCurrency?account?.raisingFundCurrency?.name:'-'}</td>
                        <td>${account?.negativeInfo?account?.negativeInfo:'-'}</td>
                        <td>${account?.subscribedCapital?account?.subscribedCapital:'-'}</td>
                        <td>
                            <g:if test="${account?.investmentDate}">
                                <g:formatDate date="${account?.investmentDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${account?.licenseNumber?account?.licenseNumber:'-'}</td>
                        <td>
                            <g:if test="${account?.auditDate}">
                                <g:formatDate date="${account?.auditDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${account?.financingInfo?account?.financingInfo:'-'}</td>
                        <td>${account?.taxInfo?account?.taxInfo:'-'}</td>
                        <td>${account?.clearInfo?account?.clearInfo:'-'}</td>
                        <td>${account?.registerType?account?.registerType:'-'}</td>
                        <td>${account?.manager?account?.manager:'-'}</td>
                        <td>${account?.recentAnnualInspection?account?.recentAnnualInspection:'-'}</td>
                        <td>${account?.agencyNumber?account?.agencyNumber:'-'}</td>
                        <td>${account?.codeOfRegisterArea?account?.codeOfRegisterArea:'-'}</td>
                        <td>${account?.aptitudeName?account?.aptitudeName:'-'}</td>
                        <td>${account?.duration?account?.duration:'-'}</td>
                        <td>${account?.shareholdersAmount?account?.shareholdersAmount:'-'}</td>
                        <td>
                            <g:if test="${account?.qualificationIssuingDate}">
                                <g:formatDate date="${account?.qualificationIssuingDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>
                            <g:if test="${account?.qualificationEndDate}">
                                <g:formatDate date="${account?.qualificationEndDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${account?.abbreviation?account?.abbreviation:'-'}</td>
                        <td>${account?.registeredAddress?account?.registeredAddress:'-'}</td>
                        <td>${account?.type?account?.type?.name:'-'}</td>
                        <td>${account?.publicFundSituation?account?.publicFundSituation:'-'}</td>
                        <td>${account?.status == 1 ? '启用':'禁用'}</td>
                        <td>${account?.registrationNumber?account?.registrationNumber:'-'}</td>
                        <td>
                            <g:if test="${account?.approvalDate}">
                                <g:formatDate date="${account?.approvalDate}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    
    %{--附件信息--}%
    <div class="row">
        <div class="hpanel hgreen collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <g:if test="${approveRoleFlag}">
                        <g:link class="btn btn-info btn-xs" controller="attachment" action="create" params="[account: this?.account?.id]"><i class="fa fa-upload"></i>上传</g:link>
                    </g:if>
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                附件信息
            </div>

            <div class="panel-body no-padding">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="horange">
                            <div class="panel-body float-e-margins" style="border-top: none;">
                                <g:each in="${com.cindata.dictionary.AttachmentType.list()}">
                                    <g:link target=" _blank" class="btn btn-outline btn-primary" controller="attachment" action="showAccount" id="${this.account.id}" params="[attachmentTypeName: it?.name]">${it?.name}</g:link>
                                </g:each>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--负面信息--}%
    <div class="row">
        <div class="hpanel hred collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                <span>负面信息</span>
            </div>

            <div class="col-md-12" style="padding: 0;">
                <div class="col-lg-3" style="padding-left: 0; padding-right: 20px;">
                    <div class="hpanel stats">
                        <div class="panel-body list">
                            <div>
                                <i class="pe-7s-attention fa-4x"></i>
                            </div>
                            <div class="list-item-container" style="width:100%;">

                                <div class="list-item">
                                    <div class="col-md-5" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${shenpanCount?shenpanCount:"--"}</h3>
                                        <small>民事审批被告记录</small>
                                    </div>
                                    <div class="col-md-5 col-md-offset-2" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${zhixingMoney?zhixingMoney:"--"}万元</h3>
                                        <small>被执行金额</small>
                                    </div>
                                </div>
                                <div class="list-item">
                                    <div class="col-md-5" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${isNormal?"正常":"非正常"}</h3>
                                        <small>纳税非正常户</small>
                                    </div>
                                    <div class="col-md-5 col-md-offset-2" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${qianshuiMoney?qianshuiMoney:"--"}万元</h3>
                                        <small>欠税金额</small>
                                    </div>
                                </div>
                                <div class="list-item">
                                    <div class="col-md-5" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${xianchuCount?xianchuCount:"--"}</h3>
                                        <small>被限制出境人数</small>
                                    </div>
                                    <div class="col-md-5 col-md-offset-2" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${shixinMoney?shixinMoney:"--"}万元</h3>
                                        <small>失信被执行金额</small>
                                    </div>
                                </div>
                                <div class="list-item">
                                    <div class="col-md-5" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${xiangaoCount?xiangaoCount:"--"}</h3>
                                        <small>被限制高消费人数</small>
                                    </div>
                                    <div class="col-md-5 col-md-offset-2" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${qiankuanMoney?qiankuanMoney:"--"}万元</h3>
                                        <small>欠款欠费金额</small>
                                    </div>
                                </div>
                                <div class="list-item">
                                    <div class="col-md-5" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${weifaCount?weifaCount:"--"}</h3>
                                        <small>行政违法记录</small>
                                    </div>
                                    <div class="col-md-5 col-md-offset-2" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${caipanMoney?caipanMoney:"--"}万元</h3>
                                        <small>被裁判金额</small>
                                    </div>
                                </div>
                                <div class="list-item">
                                    <div class="col-md-5" style="padding: 0;">
                                        <h3 class="no-margins font-extra-bold">${fanzuiCount?fanzuiCount:"--"}</h3>
                                        <small>罪犯及嫌疑人人数</small>
                                    </div>

                                </div>

                            </div>

                        </div>
                    </div>
                </div>

                <div class="col-lg-9" style="padding-left:0; padding-right: 0px;">
                    <div class="hpanel stats">
                        <div class="panel-body">
                            <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" id="esateTable">
                                <thead>
                                <tr>
                                    <th class="col-md-1 text-center sortable">负面信息</th>
                                    <th class="col-md-1 text-center sortable">当事人</th>
                                    <th class="col-md-1 text-center sortable">金额</th>
                                    <th class="col-md-1 text-center sortable">事由/执行内容</th>
                                    <th class="col-md-1 text-center sortable">状态</th>
                                    <th class="col-md-1 text-center sortable">日期</th>
                                </tr>
                                </thead>
                                <tbody>

                                <g:each in="${fumianList}">
                                    <tr>
                                        <td class="text-center">${it?.type}</td>
                                        <td class="text-center">${it?.name}</td>
                                        <td class="text-center">${it?.money ? it?.money : "--"}</td>
                                        <td class="text-center" title="${it?.content}">${ it?.content.length() >= 20 ? it?.content.substring(0,20)+"...":it?.content?it?.content:"--"}</td>
                                        <td class="text-center">${it?.state}</td>
                                        <td class="text-center">${it?.sslong}</td>
                                    </tr>
                                </g:each>

                                </tbody>
                            </table>
                        </div>

                        %{--分页器--}%
                        <div class="panel-footer">
                            <div class="pagination">
                                <g:paginate action="searchEstate" total="${estateCount ?: 0}" params="${params}"/>
                            </div>
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>

    <div class="row">
        <div class="hpanel hgreen collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                机构清退
            </div>

            <div class="panel-body no-padding">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>机构名称</th>
                        <th>机构地址</th>
                        <th>企业法人</th>
                        <th>经营状态</th>
                        <th>清退原因</th>
                        <th>清退日期</th>
                    </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>${this?.account?.name?this?.account?.name:'-'}</td>
                            <td>${this?.account?.address?this?.account?.address:'-'}</td>
                            <td>${this?.account?.fullName?this?.account?.fullName:'-'}</td>
                            <td>${this?.account?.operatingState?this?.account?.operatingState:'-'}</td>
                            <td>${this?.account?.retreatResult?this?.account?.retreatResult:'-'}</td>
                            <td>
                                <g:if test="${this?.account?.retreatDate}">
                                    <g:formatDate date="${this?.account?.retreatDate}" format="yyyy-MM-dd"></g:formatDate>
                                </g:if>
                                <g:else>
                                    -
                                </g:else>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="hpanel hgreen collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                机构年检
            </div>

            <div class="panel-body no-padding">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>年度</th>
                        <th>年检到期日</th>
                        <th>年检状态</th>
                        <th>年检人</th>
                        <th>年检结果</th>
                        <th>备注</th>
                    </tr>
                    </thead>
                    <tbody>
                    <g:each in="${com.cindata.AccountInspect.findAllByAccount(this?.account)}">
                    <tr>
                        <td>${it?.year?it?.year:'-'}</td>
                        <td>
                            <g:if test="${it?.endTime}">
                                <g:formatDate date="${it?.endTime}" format="yyyy-MM-dd"></g:formatDate>
                            </g:if>
                            <g:else>
                                -
                            </g:else>
                        </td>
                        <td>${it?.status?it?.status:'-'}</td>
                        <td>${it?.user?.fullName?it?.user?.fullName:'-'}</td>
                        <td>${it?.result?it?.result:'-'}</td>
                        <td>${it?.memo?it?.memo:'-'}</td>
                    </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <g:if test="${params?.code == 'DeveloperAccount'}">
        <div class="row">
            <div class="hpanel hgreen collapsed">
                <div class="panel-heading hbuilt">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    </div>
                    项目信息
                </div>

                <div class="panel-body no-padding">
                    <table class="table table-striped table-bordered table-hover text-center">
                        <thead>
                        <tr>
                            <th>项目名称</th>
                            <th>城市</th>
                            <th>项目地址</th>
                            <th>建筑类别</th>
                            <th>竣工验收日期</th>
                            <th>交房日期</th>
                            <th>预售证编号</th>
                            <th>入围状态</th>
                            <th colspan="1" width="8%" class="text-center">操作项</th>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${com.cindata.AccountProject.findAllByAccount(this?.account)}">
                        <tr>
                            <td><g:link style="color: #3498DB" controller="accountProject" action="show" id="${it?.id}" params="[code: params['code']]" class="firstTd">${it?.name?it?.name:'-'}</g:link></td>
                            <td>${it?.city?it?.city?.name:'-'}</td>
                            <td>${it?.address?it?.address:'-'}</td>
                            <td>${it?.buildingstructure?it?.buildingstructure:'-'}</td>
                            <td>
                                <g:if test="${it?.completionDate}">
                                    <g:formatDate date="${it?.completionDate}" format="yyyy-MM-dd"></g:formatDate>
                                </g:if>
                                <g:else>
                                    -
                                </g:else>
                            </td>
                            <td>
                                <g:if test="${it?.deliveryDate}">
                                    <g:formatDate date="${it?.deliveryDate}" format="yyyy-MM-dd"></g:formatDate>
                                </g:if>
                                <g:else>
                                    -
                                </g:else>
                            </td>
                            <td>${it?.preSalePermitNumber?it?.preSalePermitNumber:'-'}</td>
                            <td>${it?.entryStatus?it?.entryStatus:'-'}</td>
                            <td>
                                <g:link controller="accountProject" action="edit" params="[id: it?.id, code: params['code']]" class="btn btn-success btn-xs btn-outline"><i class="fa fa-edit"></i> 编辑</g:link>
                            </td>
                        </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </g:if>

    <div class="row">
        <div class="hpanel hgreen collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                工作流
            </div>

            <div class="panel-body no-padding">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <g:sortableColumn property="name" title="名称"/>
                            <g:sortableColumn property="workflow" title="工作流"/>
                            <g:sortableColumn property="stage" title="当前阶段"/>
                            <g:sortableColumn property="status" title="当前状态"/>
                            <g:sortableColumn property="createdDate" title="创建时间"/>
                            <g:sortableColumn property="modifiedDate" title="修改时间"/>
                            <g:sortableColumn colspan="2" class="text-center" width="8%" property="comments" title="操作"/>
                        </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    <g:link controller="workflowInstance" action="show" id="${workflowInstance?.id}">${workflowInstance?.name}</g:link>
                                </td>
                                <td>${workflowInstance?.workflow?.name}</td>
                                <td>${workflowInstance?.stage?.name}</td>
                                <td>${workflowInstance?.status?.name}</td>
                                <td>${workflowInstance?.createdDate}</td>
                                <td>${workflowInstance?.modifiedDate}</td>
                                <td class="text-center">
                                    <g:link class="btn btn-info btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'account']"
                                            action="reject"><i class="fa fa-arrow-up"></i> 上一步</g:link>
                                    <g:link class="btn btn-info btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'account']"
                                            action="approve"><i class="fa fa-arrow-down"></i> 下一步</g:link>
                                    <g:link class="btn btn-danger btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'account']"
                                            action="cancel"><i class="fa fa-exclamation-circle"></i> 失败</g:link>
                                    <g:link class="btn btn-success btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'account']"
                                            action="complete"><i class="fa fa-check"></i> 完成</g:link>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <!-- <footer class="footer bg-success" style="left: 0;bottom: 41px; padding: 5px 50px 2px 18px;">
        <div class="row">
            <div class="text-right">
                <g:if test="${approveRoleFlag}">
                    <g:link class="btn btn-info btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'account']"
                            action="reject"><i class="fa fa-arrow-up"></i> 上一步</g:link>
                    <g:link class="btn btn-info btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'account']"
                            action="approve"><i class="fa fa-arrow-down"></i> 下一步</g:link>
                    <g:link class="btn btn-danger btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'account']"
                            action="cancel"><i class="fa fa-exclamation-circle"></i> 失败</g:link>
                    <g:link class="btn btn-success btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'account']"
                            action="complete"><i class="fa fa-check"></i> 完成</g:link>
                </g:if>
            </div>
        </div>
    </footer> -->

</div>

<div class="modal fade" id="accountReject" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <g:form class="form-horizontal rejectform" controller="account" action="reject" params="${params}">
                <input type="hidden" name="account.id" value="${this.account?.id}">
                <div class="color-line"></div>

                <div class="modal-header">
                    <h4 class="modal-title">返回原因</h4>
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">返回原因</label>
                        <div class="col-sm-10">
                            <g:textArea class="form-control" id="comment" name="comment" value="" rows="6"/>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary accountRejectBtn">保存</button>
                </div>
            </g:form>
        </div>
    </div>
</div>

<script>
    // 确认拒绝
    $(document).delegate(".accountRejectBtn", "click",
        function() {
            var comment = $("#comment").val();
            if (!comment) 
            {
                toastr.error('请填写返回原因！');
                return
            }
            swal({
                title: "是否确认提交吗?",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#3aa9dd",
                cancelButtonText: "取消",
                confirmButtonText: "确认",
                closeOnConfirm: false,
                closeOnCancel: true
            },
            function(isConfirm) {
                if (isConfirm) {
                    $(".rejectform").submit();
                    swal("提交成功！", "", "success");
                }
            });
        });
</script>
</body>
</html>
